﻿using System.Web.Mvc;
using KMF.WebUI.Infrastructure;

namespace KMF.WebUI.Attributes
{
    public class CheckSessionCart : ActionFilterAttribute
    {
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            if (filterContext.HttpContext.Session[SessionConfig.SessionCartInfor] == null)
            {
                filterContext.Result = new RedirectResult("/Order/CheckCart");
            }
        }
    }
}